<?php
namespace app\index\controller;

use think\Controller;
use think\Request;
use app\service\DataService;
use think\facade\Env;

class Index extends Controller
{
    //分类服务
    private $dataService;

    //初始化方法
    public function initialize()
    {
        $this->dataService = new DataService();
    }

    public function index()
    {
        return $this->fetch();
    }

    public function form()
    {
        return $this->fetch();
    }

    public function upload(){
        return $this->dataService->save();
    }
}
